package com.zd.manage.service.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zd.manage.dao.PersonDao;
import com.zd.manage.entity.BaseBody;
import com.zd.manage.entity.Person;
import com.zd.manage.service.PersonService;
@Service("personService")
public class PersonServiceImpl implements PersonService {
	@Autowired
	PersonDao personDao;
	public BaseBody findAllPerson() {
		// TODO Auto-generated method stub
		BaseBody result = new BaseBody();
		HashMap<String, Object> value = new HashMap<String, Object>();
				
		result.setCode("200");
		result.setMsg("查询成功");
		value.put("list", personDao.findAllPerson());
		result.setVal(value);
		return result;
	}
	public int AddPerson(Person person) {
		// TODO Auto-generated method stub
		return personDao.addPerson(person);
	}

}
